package com.lczyfz.istep.modules.teach.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lczyfz.istep.common.persistence.DataEntity;
import com.lczyfz.istep.common.utils.excel.annotation.ExcelField;
import com.lczyfz.istep.modules.sys.entity.Office;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * Created by Alisa Ye on 2017/2/24.
 * 对应sys_user表
 */
public class TeachTeacher extends DataEntity<TeachStudent> {

    private static final long serialVersionUID = 1L;
    private String classId;		// 所属班级
    private String companyId;		// 归属公司
    private Office office;		// 归属部门
    private String loginName;		// 登录名
    private String password;		// 密码
    private String no;		// 工号
    private String name;		// 姓名
    private String email;		// 邮箱
    private String phone;		// 电话
    private String mobile;		// 手机
    private String organization;		// 组织
    private String userType;		// 用户类型
    private String photo;		// 用户头像
    private String loginIp;		// 最后登陆IP
    private Date loginDate;		// 最后登陆时间
    private String loginFlag;		// 是否可登录

    private String oldLoginName;// 原登录名
    private String newPassword;    // 新密码

    public TeachTeacher() {
        super();
    }

    public TeachTeacher(String id){
        super(id);
    }

    @ExcelField(title = "所属班级", align = 2, sort = 40)
    public String getClassId() {
        return classId;
    }

    public void setClassId(String classId) {
        this.classId = classId;
    }

    @Length(min=0, max=64, message="归属公司长度必须介于 0 和 64 之间")
    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public Office getOffice() {
        return office;
    }

    public void setOffice(Office office) {
        this.office = office;
    }

    @Length(min=1, max=100, message="登录名长度必须介于 1 和 100 之间")
    @ExcelField(title = "登录名", align = 2, sort = 30)
    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    @Length(min=1, max=100, message="密码长度必须介于 1 和 100 之间")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Length(min=0, max=100, message="工号长度必须介于 0 和 100 之间")
    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    @Length(min=1, max=100, message="姓名长度必须介于 1 和 100 之间")
    @ExcelField(title = "姓名", align = 1, sort = 20)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Length(min=0, max=200, message="邮箱长度必须介于 0 和 200 之间")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Length(min=0, max=200, message="电话长度必须介于 0 和 200 之间")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Length(min=0, max=200, message="手机长度必须介于 0 和 200 之间")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Length(min=0, max=100, message="组织长度必须介于 0 和 100 之间")
    public String getOrganization() {
        return organization;
    }

    public void setOrganization(String organization) {
        this.organization = organization;
    }

    @Length(min=0, max=1, message="用户类型长度必须介于 0 和 1 之间")
//	@ExcelField(title = "用户类型", align = 2, sort = 80, dictType = "sys_user_type")
    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    @Length(min=0, max=1000, message="用户头像长度必须介于 0 和 1000 之间")
    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    @Length(min=0, max=100, message="最后登陆IP长度必须介于 0 和 100 之间")
    public String getLoginIp() {
        return loginIp;
    }

    public void setLoginIp(String loginIp) {
        this.loginIp = loginIp;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getLoginDate() {
        return loginDate;
    }

    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }

    @Length(min=0, max=64, message="是否可登录长度必须介于 0 和 64 之间")
    public String getLoginFlag() {
        return loginFlag;
    }

    public void setLoginFlag(String loginFlag) {
        this.loginFlag = loginFlag;
    }

    public String getOldLoginName() {
        return oldLoginName;
    }

    public void setOldLoginName(String oldLoginName) {
        this.oldLoginName = oldLoginName;
    }

    public String getNewPassword() {
        return newPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

//	@ExcelField(title = "创建时间", type = 0, align = 1, sort = 90)
//	public Date getCreateDate() {
//		return createDate;
//	}
//
//	@ExcelField(title = "备注", align = 1, sort = 900)
//	public String getRemarks() {
//		return remarks;
//	}


}
